package com.jrx.anytxn.transaction.dto.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName AccountMainInfoRes
 *   交易账户信息返回（成员与数据库表对应）
 * @author  liy
 * date  2019/8/15
 * @Version V1.0
 **/
public class AccountMainInfoRes implements Serializable {
    /**
     * 自增主键
     */
    private Long id;
    /**
     * 租户id
     */
    private String tenantId;

    /**
     * 账户id
     */
    private String accountId;

    /**
     * 机构号
     */
    private String organizationId;

    /**
     * 账户状态(0-新建 1-正常 2-逾期 7-提前结清 8-正常结清 9-取消)
     */
    private String accountStatus;

    /**
     * 产品id
     */
    private String productId;

    /**
     * 账户类型(03-费用 04-利息 05 = 分期/贷款 06 = 分期/贷款扣账 08 = 还款 09 = 还款交易子交易)
     */
    private String accountType;

    /**
     * 交易码
     */
    private String txnCode;

    /**
     * 客户id
     */
    private String customerId;

    /**
     * 	贷款订单id
     */
    private String loanId;

    /**
     * 第几期
     */
    private Integer billingTenor;

    /**
     * 入账金额
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal postingAmount;

    /**
     * 本行出资金额
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal postingAmountOnus;

    /**
     * 已还金额
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal repayAmount;

    /**
     * 贷调金额(调整金额(免除金额))
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal creditAdjustAmount;

    /**
     * 余额
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal currBalance;

    /**
     * 本行余额
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private BigDecimal currBalanceOnus;

    /**
     * 年利率
     */
    private BigDecimal interestRate;

    /**
     * 执行日利率
     */
    private BigDecimal actualDailyRate;

    /**
     * 交易起息日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date interestStartDate;

    /**
     * 到期还款日
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date paymentDueDate;

    /**
     * 利息参数表id
     */
    private String interestTableId;

    /**
     * 罚息参数表id
     */
    private String penaltyTableId;

    /**
     * 费用参数表id
     */
    private String feeTableId;

    /**
     * 联合贷标识(0=否 1=是)
     */
    private String jointLoanFlag;

    /**
     * 	兜底模式 (0-我行 1-资金源 2=合作方 3=共享)
     */
    private String revealMobel;

    /**
     * 从合作行回收费率
     */
    private BigDecimal buyBackFeeRate;

    /**
     * 资金源id
     */
    private String fundId;

    /**
     * 合作方id
     */
    private String partnerId;

    /**
     * 停息标志(0=停息 1=正常计息)
     */
    private String waiveInterestFlag;

    /**
     * 停费标志(0=停费 1=正常计费)
     */
    private String waiveFeeFlag;

    /**
     * 	核销标志(0-否 1-已核销)
     */
    private String chargeoffFlag;

    /**
     * 核销金额
     */
    private BigDecimal chargeoffAmount;

    /**
     * 核销日期
     */
    private Date chargeoffDate;

    /**
     * 核销原因码
     */
    private String chargeoffReasonCode;

    /**
     * 代偿标识(0=否 1=是)
     */
    private String compensatoryFlag;

    /**
     * 代偿天数
     */
    private Integer compensatoryDays;

    /**
     * 会计状态(0=正常 1=逾期 2=呆滞 3=呆账)
     */
    private String accountingPhase;

    /**
     * 非应记状态(0=应计 1=非应计)
     * 表字段:non_accruals_flag
     */
    private String nonAccrualsFlag;

    /**
     * 五级分类(0=正常 1=关注 2=次级 3=可疑 4=损失)
     */
    private String loanClassify;

    /**
     * 原始账户id
     */
    private String originalAccountId;

    /**
     * 渠道id
     */
    private String channel;

    /**
     * 入账时间
     * 表字段:posting_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date postingDate;

    /**
     * 上次还款时间
     * 表字段:last_payment_time
     */
    private Date lastPaymentTime;

    /**
     * 总期数
     * 表字段:total_tenor
     */
    private Integer totalTenor;

    /**
     * 贷款期限天数
     * 表字段:total_days
     */
    private Integer totalDays;

    public Date getLastPaymentTime() {
        return lastPaymentTime;
    }

    public void setLastPaymentTime(Date lastPaymentTime) {
        this.lastPaymentTime = lastPaymentTime;
    }

    public Integer getTotalTenor() {
        return totalTenor;
    }

    public void setTotalTenor(Integer totalTenor) {
        this.totalTenor = totalTenor;
    }

    public Integer getTotalDays() {
        return totalDays;
    }

    public void setTotalDays(Integer totalDays) {
        this.totalDays = totalDays;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    public String getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(String accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getAccountType() {
        return accountType;
    }

    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    public String getTxnCode() {
        return txnCode;
    }

    public void setTxnCode(String txnCode) {
        this.txnCode = txnCode;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public Integer getBillingTenor() {
        return billingTenor;
    }

    public void setBillingTenor(Integer billingTenor) {
        this.billingTenor = billingTenor;
    }

    public BigDecimal getPostingAmount() {
        return postingAmount;
    }

    public void setPostingAmount(BigDecimal postingAmount) {
        this.postingAmount = postingAmount;
    }

    public BigDecimal getPostingAmountOnus() {
        return postingAmountOnus;
    }

    public void setPostingAmountOnus(BigDecimal postingAmountOnus) {
        this.postingAmountOnus = postingAmountOnus;
    }

    public BigDecimal getRepayAmount() {
        return repayAmount;
    }

    public void setRepayAmount(BigDecimal repayAmount) {
        this.repayAmount = repayAmount;
    }

    public BigDecimal getCreditAdjustAmount() {
        return creditAdjustAmount;
    }

    public void setCreditAdjustAmount(BigDecimal creditAdjustAmount) {
        this.creditAdjustAmount = creditAdjustAmount;
    }

    public BigDecimal getCurrBalance() {
        return currBalance;
    }

    public void setCurrBalance(BigDecimal currBalance) {
        this.currBalance = currBalance;
    }

    public BigDecimal getCurrBalanceOnus() {
        return currBalanceOnus;
    }

    public void setCurrBalanceOnus(BigDecimal currBalanceOnus) {
        this.currBalanceOnus = currBalanceOnus;
    }

    public BigDecimal getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(BigDecimal interestRate) {
        this.interestRate = interestRate;
    }

    public BigDecimal getActualDailyRate() {
        return actualDailyRate;
    }

    public void setActualDailyRate(BigDecimal actualDailyRate) {
        this.actualDailyRate = actualDailyRate;
    }

    public Date getInterestStartDate() {
        return interestStartDate;
    }

    public void setInterestStartDate(Date interestStartDate) {
        this.interestStartDate = interestStartDate;
    }

    public Date getPaymentDueDate() {
        return paymentDueDate;
    }

    public void setPaymentDueDate(Date paymentDueDate) {
        this.paymentDueDate = paymentDueDate;
    }

    public String getInterestTableId() {
        return interestTableId;
    }

    public void setInterestTableId(String interestTableId) {
        this.interestTableId = interestTableId;
    }

    public String getPenaltyTableId() {
        return penaltyTableId;
    }

    public void setPenaltyTableId(String penaltyTableId) {
        this.penaltyTableId = penaltyTableId;
    }

    public String getFeeTableId() {
        return feeTableId;
    }

    public void setFeeTableId(String feeTableId) {
        this.feeTableId = feeTableId;
    }

    public String getJointLoanFlag() {
        return jointLoanFlag;
    }

    public void setJointLoanFlag(String jointLoanFlag) {
        this.jointLoanFlag = jointLoanFlag;
    }

    public String getRevealMobel() {
        return revealMobel;
    }

    public void setRevealMobel(String revealMobel) {
        this.revealMobel = revealMobel;
    }

    public BigDecimal getBuyBackFeeRate() {
        return buyBackFeeRate;
    }

    public void setBuyBackFeeRate(BigDecimal buyBackFeeRate) {
        this.buyBackFeeRate = buyBackFeeRate;
    }

    public String getFundId() {
        return fundId;
    }

    public void setFundId(String fundId) {
        this.fundId = fundId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getWaiveInterestFlag() {
        return waiveInterestFlag;
    }

    public void setWaiveInterestFlag(String waiveInterestFlag) {
        this.waiveInterestFlag = waiveInterestFlag;
    }

    public String getWaiveFeeFlag() {
        return waiveFeeFlag;
    }

    public void setWaiveFeeFlag(String waiveFeeFlag) {
        this.waiveFeeFlag = waiveFeeFlag;
    }

    public String getChargeoffFlag() {
        return chargeoffFlag;
    }

    public void setChargeoffFlag(String chargeoffFlag) {
        this.chargeoffFlag = chargeoffFlag;
    }

    public BigDecimal getChargeoffAmount() {
        return chargeoffAmount;
    }

    public void setChargeoffAmount(BigDecimal chargeoffAmount) {
        this.chargeoffAmount = chargeoffAmount;
    }

    public Date getChargeoffDate() {
        return chargeoffDate;
    }

    public void setChargeoffDate(Date chargeoffDate) {
        this.chargeoffDate = chargeoffDate;
    }

    public String getChargeoffReasonCode() {
        return chargeoffReasonCode;
    }

    public void setChargeoffReasonCode(String chargeoffReasonCode) {
        this.chargeoffReasonCode = chargeoffReasonCode;
    }

    public String getCompensatoryFlag() {
        return compensatoryFlag;
    }

    public void setCompensatoryFlag(String compensatoryFlag) {
        this.compensatoryFlag = compensatoryFlag;
    }

    public Integer getCompensatoryDays() {
        return compensatoryDays;
    }

    public void setCompensatoryDays(Integer compensatoryDays) {
        this.compensatoryDays = compensatoryDays;
    }

    public String getAccountingPhase() {
        return accountingPhase;
    }

    public void setAccountingPhase(String accountingPhase) {
        this.accountingPhase = accountingPhase;
    }

    public String getLoanClassify() {
        return loanClassify;
    }

    public void setLoanClassify(String loanClassify) {
        this.loanClassify = loanClassify;
    }

    public String getOriginalAccountId() {
        return originalAccountId;
    }

    public void setOriginalAccountId(String originalAccountId) {
        this.originalAccountId = originalAccountId;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public Date getPostingDate() {
        return postingDate;
    }

    public void setPostingDate(Date postingDate) {
        this.postingDate = postingDate;
    }

    public String getNonAccrualsFlag() {
        return nonAccrualsFlag;
    }

    public void setNonAccrualsFlag(String nonAccrualsFlag) {
        this.nonAccrualsFlag = nonAccrualsFlag;
    }
}
